home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Applications
/
VHS Library 1.0
/
VHS Library 1.0
/
stack_-1.xml
< prev
next >
Wrap
Extensible Markup Language
|
1993-09-03
|
11KB
|
21 lines
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in.0</name>
<id>-1</id>
<cardCount>2</cardCount>
<cardID>2966</cardID>
<listID>2180</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞HyperCard Home StackVersion 2.1©Copyright 1987-1991 by Apple Computer, Inc.All Rights Reserved.THE MESSAGE HANDLERS USED IN THIS SCRIPT:startUp,getHomeInfo,resume,help,hyperTalknav,c,b,s,mw,vw,se,ss,xy,disallowInterruption,allowInterruptionsetUserLevelFive,restoreUserLevel,searchScript,checkForMissingFontsTHE FUNCTION HANDLERS USED IN THIS SCRIPT:lastHCItem,checkHCFontXCMD'S USED BY THIS SCRIPT:FontExists XFCNForm: FontExists(<font name>,<point size>)It returns true if the font/point size is installed or false if not.∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞----- Startup/Resume Scripts: ---------------------------------------------on startUp-- Requires handler: getHomeInfo,checkForMissingFonts-- gets and sets the user's preferencescheckForMissingFontsgetHomeInfo-- audio Palette startupif there is a stack "Audio Help" then -- ∆start using stack "Audio Help" -- ∆send "startSound" to stack "Audio Help" -- ∆end ifpass startUp -- so others can use itend startUpon getHomeInfo-- Needs: User preferences card of the home stack-- configures HyperCard to the user specified preferencesglobal Stacks,Applications,Documents,UserNameif short name of this stack is not "Home" then -- ∆lock screenset lockRecent to trueset lockMessages to truepush this card -- remember where we arego home -- will take us to the home stack in case we're not thereput false into stackIsHomeelse put true into stackIsHomeput (cd fld "User Name" of cd "User Preferences") into UserNameset the userLevel to cd fld "User Level" of cd "User Preferences" -- hidden fieldset the powerKeys to hilite of cd btn id 3 of cd "User Preferences" -- Power Keysset the textArrows to hilite of cd btn id 2 of cd "User Preferences" -- Arrow keys in textset the blindTyping to hilite of cd btn id 1 of cd "User Preferences" -- Blind Typing-- load the search path globalsput bg fld "Paths" of cd "Stacks" of bg "Paths" into Stacksput bg fld "Paths" of cd "Applications" of bg "Paths" into Applicationsput bg fld "Paths" of cd "Documents" of bg "Paths" into Documentsif not stackIsHome thenpop card -- return to where we wereset lockRecent to false -- clean up for exitset lockMessages to falseunlock screenend ifend getHomeInfoon resume-- Requires handler: getHomeInfo-- gets and sets user preferences upon returninggetHomeInfopass resume -- so others can use itend resume----- Help Scripts --------------------------------------------on help theTopic-- ∆ Note: typing "help <topic>" into msg box will locate-- the <topic> in "HyperCard Help"put "HyperCard Help" into theStack -- ∆if ":" & theStack & return is in the stacks thenif the longWindowTitlesthen show window line (the number of lines of char 1 to offset(":" & theStack & return, the stacks) of the stacks) of the stackselse show window theStackelsego to stack theStack in a new window -- try in a new windowif the result = "Cancel" then exit to hyperCardelse if the result ≠ empty then go to stack theStackend ifif the result is empty then findInTitle theTopic -- in the help stackend helpon hyperTalk theTopic-- ∆ Note: typing "hyperTalk <topic>" into msg box will locate-- the <topic> in "HyperTalk Reference"put "HyperTalk Reference" into theStack -- ∆if ":" & theStack & return is in the stacks thenif the longWindowTitlesthen show window line (the number of lines of char 1 to offset(":" & theStack & return, the stacks) of the stacks) of the stackselse show window theStackelsego to stack theStack in a new window -- try in a new windowif the result = "Cancel" then exit to hyperCardelse if the result ≠ empty then go to stack theStackend ifif the result is empty then findInTitle theTopic -- in the help stackend hyperTalk----- Utility Scripts --------------------------------------------on nav -- ∆ type "nav" into message box-- Requires XCMD: palette "Navigator"palette "Navigator"end navon c -- ∆ type "c" into message box-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Card Info..."restoreUserLevelchoose saveToolend con b -- ∆ type "b" into message box-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Bkgnd Info..."restoreUserLevelchoose saveToolend bon s -- ∆ type "s" into message box-- Requires handlers: setUserLevelFive,restoreUserLevelput the tool into saveToolchoose browse toolsetUserLevelFive -- so the menu item will be theredoMenu "Stack Info..."restoreUserLevelchoose saveToolend son mw -- ∆ type "mw" into message box-- Requires XWindow: Message Watchershow window "Message Watcher"end mwon vw -- ∆ type "vw" into message box-- Requires XWindow: Variable Watchershow window "Variable Watcher"end vwon se -- ∆ type "se" into message box-- Requires XWindow: Script Editorask "Set script editor font type to:" with "Monaco" -- ∆ default valueif the result is "Cancel" or it is empty then exit seset scriptTextFont to itask "Set script editor font size to:" with "9" -- ∆ default valueif the result is "Cancel" or it is empty then exit seset scriptTextSize to itend seon ss pattern,stackName -- ∆ type "ss" into message box-- Requires handler: searchScriptsearchScript pattern,stackNameend sson xy -- ∆ type "xy" into message box to obtain mouse coordinatesset cursor to crossrepeat until the mouseClickput the mouseLoc && " horz:" & the mouseH && " vert:" & the mouseVend repeatend xyon disallowInterruption -- so can't stop scripts while runningset cantAbort of this stack to trueend disallowInterruptionon allowInterruption -- so can stop scripts while runningset cantAbort of this stack to falseend allowInterruptionon setUserLevelFive -- some things need this userLevelglobal SvLvlput the userLevel into SvLvlset the userLevel to 5end setUserLevelFiveon restoreUserLevel -- use after setUserLevelFiveglobal SvLvlif SvLvl is a number then set the userLevel to SvLvlend restoreUserLevelon searchScript pattern,stackName-- Requires handlers: setUserLevelFive,restoreUserLevel-- search ALL scripts of a stack for a 'pattern' of charactersglobal ScriptFindString -- HyperTalk global variableset lockRecent to truesetUserLevelFive -- saves current level and sets level 5push card -- remember where we areif pattern is empty thenask "Search for what string?" with ScriptFindString -- ∆if (it is empty) or (the result is "Cancel") then exit searchScriptput it into pattern -- otherwise use it as the search patternend if-- put in HyperTalk global so just CMD-F in editor for easy findput pattern into ScriptFindStringset lockMessages to true -- avoid open messagesif stackName is not empty then go to stack stackName-- Note: if stackName is empty then we search the current stackset cursor to busy-- search the stack script of the stackif the script of this stack contains patternthen edit script of this stack-- search the background scripts and objects of the stackrepeat with curBkgnd = 1 to the number of bkgndsset cursor to busygo to card 1 of bkgnd curBkgndif the script of this bkgnd contains patternthen edit script of bkgnd curBkgndrepeat with curBgBtn = 1 to the number of bkgnd buttonsset cursor to busyif the script of bkgnd button curBgBtn contains patternthen edit script of bkgnd button curBgBtnend repeatrepeat with curBgField = 1 to the number of bkgnd fieldsset cursor to busyif the script of bkgnd field curBgField contains patternthen edit script of bkgnd field curBgFieldend repeatend repeat-- search the card scripts and objects of the stackrepeat with curCard = 1 to the number of cardsset cursor to busygo card curCardif the script of this card contains patternthen edit script of this cardrepeat with curCdBtn = 1 to the number of card buttonsset cursor to busyif the script of card button curCdBtn contains patternthen edit script of card button curCdBtnend repeatrepeat with curCdFld = 1 to the number of card fieldsset cursor to busyif the script of card field curCdFld contains patternthen edit script of card field curCdFldend repeatend repeatset lockMessages to falseset lockRecent to falsepop card -- return to where we wererestoreUserLevel -- set userLevel back to whatever it wasanswer "Search script done!" -- ∆end searchScriptfunction lastHCItem delim,theText-- returns the portion of <theText> that follows the last <delim>if delim is in theText thenput lastHCItem(delim,char offset(delim,theText) + 1 to ¬length(theText) of theText) into theTextend ifreturn theTextend lastHCItem----- Font Adjustment Scripts: ----------------------------------on checkForMissingFonts-- Requires handler: checkHCFont-- check to see if the fonts needed for the stacks are-- installed in the system. Inform the user if they're not.get checkHCFont("Courier","9,12") & checkHCFont("Geneva","10,14") & ¬checkHCFont("Palatino","10,12,14,18,24") & ¬checkHCFont("Helvetica","18,24") -- these are fonts needed by this stackif it is empty then exit checkForMissingFontselse put it into missingFontsbeep-- this dialog informs the user which fonts are missinganswer "These font(s) are missing from your system:" & ¬return & return & missingFonts & return & ¬"For text to display correctly in the stacks, make sure you have" ¬&& "installed the fonts included with HyperCard." -- ∆end checkForMissingFontsfunction checkHCFont theFont,pointSizes-- Requires XFCN: FontExists-- returns a list of font sizes needed but not in the systemput empty into missing-- steps through each point size passed inrepeat with count = 1 to the number of items in pointSizesput item count of pointSizes into theCurrentPtSizeif not FontExists(theFont,theCurrentPtSize) -- if can't find itthen put theCurrentPtSize & "," after missingend repeatif missing is not empty thenput theFont & space before missingdelete last char of missingput return after missingend ifreturn missingend checkHCFont</script>
<background id="2760" file="background_2760.xml" name="Home Cards" />
<card id="2966" file="card_2966.xml" marked="false" name="" owner="2760" />
<card id="4747" file="card_4747.xml" marked="false" name="" owner="2760" />
</stack>